/**
 * Swagger API使用示例
 * 这个文件展示了如何使用各个API端点
 */

export const swaggerExamples = {
  users: {
    create: {
      request: {
        username: "johndoe",
        email: "john@example.com",
        password: "securePassword123",
        firstName: "John",
        lastName: "Doe"
      },
      response: {
        message: "用户创建成功",
        user: {
          id: 1,
          username: "johndoe",
          email: "john@example.com",
          firstName: "John",
          lastName: "Doe",
          isActive: true,
          provider: "local",
          createdAt: "2024-01-15T10:00:00.000Z",
          updatedAt: "2024-01-15T10:00:00.000Z"
        }
      }
    },
    update: {
      request: {
        firstName: "Johnny",
        lastName: "Doe Jr.",
        email: "johnny@example.com"
      }
    }
  },
  posts: {
    create: {
      request: {
        title: "我的第一篇博客文章",
        content: "这是一篇关于TypeScript和Express的精彩文章...",
        summary: "介绍如何使用TypeScript构建Express应用",
        authorId: 1
      },
      response: {
        message: "文章创建成功",
        post: {
          id: 1,
          title: "我的第一篇博客文章",
          content: "这是一篇关于TypeScript和Express的精彩文章...",
          summary: "介绍如何使用TypeScript构建Express应用",
          published: false,
          authorId: 1,
          createdAt: "2024-01-15T10:00:00.000Z",
          updatedAt: "2024-01-15T10:00:00.000Z"
        }
      }
    }
  },
  payments: {
    createCheckoutSession: {
      request: {
        priceId: "price_1234567890",
        successUrl: "https://example.com/success",
        cancelUrl: "https://example.com/cancel",
        customerEmail: "customer@example.com"
      }
    },
    webhook: {
      headers: {
        "stripe-signature": "t=1234567890,v1=..."
      }
    }
  },
  auth: {
    googleLogin: {
      request: {
        credential: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjE..."
      },
      response: {
        message: "登录成功",
        user: {
          id: 2,
          email: "user@gmail.com",
          firstName: "Google",
          lastName: "User",
          provider: "google",
          picture: "https://lh3.googleusercontent.com/...",
          isActive: true
        }
      }
    }
  }
}; 